|
|
|
|
|
|
|
Examples Filename: ApiTabs.frm |
|
|
|
|
|
|
|
|
Figure 28.5
Multiple tab stops in a list box. |
|
|
|
|
|
|
|
|
To create multiple tab stops for a list box, you use an array of Long data types as the fourth parameter to the SendMessage() function. Look at the following code for an example of creating multiple tab stops: |
|
|
|
 |
|
|
|
|
Private Sub Form_Load()
Dim lngRet As Long Dim aTabs(2) As Long
aTabs(0) = 48
aTabs(1) = 116
aTabs(2) = 186
lngRet = SendMessage(lstStates.hwnd, _
LB_SETTABSTOPS, _
3, _
aTabs(0))
Call StateLoad
End Sub |
|
|
|
|
|
|
|
|
In this code, an array of three longs are created and then the appropriate dialog units are set into each element of the array. Next, SendMessage() is called with the third parameter, which is set to the number of tab stops (3). The fourth parameter is the first element of the array. The array is passed by reference to the C language routine. The first element is the address of where the array starts in memory. C can now just walk through all three elements by adding four bytes to the base address for each element in the array. |
|
|
|
|
|